using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.IO;

namespace script_tester
{
    class User
    {
        private class __tread
        {
            bool Active = true;
            plugin[] _p_plugins = null;
            
            public void InitThread()
            {
                DirectoryInfo _di_plugins = new DirectoryInfo(@".\");
                FileInfo[] _fi_plugins = _di_plugins.GetFiles("*.csx");
                _p_plugins = new plugin[_fi_plugins.Length];  
               
                for (int i = 0; i < _fi_plugins.Length; i++ )
                {
                    _p_plugins[i] = new plugin(_fi_plugins[i].Name);
                    
                }

                while (this.Active)
                {

                    //string s = _p_plugins[0]._s_hint;
                    
                    Thread.Sleep(1000);
                }
            }
        }

        private DateTime _dt_CreateClass = DateTime.Now;
        private string _s_NickName = null;
        private Thread ThreadUser;


        public DateTime ConnectTime 
        {
            get { return this._dt_CreateClass; }
        }

        public string NickName
        {
            get { return this._s_NickName; }
        }
        
        public User(string Nick)
        {
            this._s_NickName = Nick;
            __tread _thr = new __tread();
            ThreadUser = new Thread(new ThreadStart(_thr.InitThread));
            ThreadUser.Start();
            
        }
    }
}
